<html>
<body>
<pre id="console">
test
</pre>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();

    var msg = 'A page with only one line should be printed in one page.\n';
    var pass = true;

    // Test the range around A4 portrait paper size
    for (var i = 530; i <= 560; i += 10) {
        for (var j = 730; j <= 760; j += 10) {
            var numberOfPages = internals.numberOfPages(i, j);

            if (numberOfPages != 1) {
                pass = false;
                msg += 'width=' + i + ', height=' + j + ': numberOfPages=' + numberOfPages + ' FAIL\n';
            }
        }
    }
    msg += (pass ? 'PASS' : 'FAIL');
    document.querySelector('#console').textContent = msg;
}
</script>
</body>
</html>
